package com.fcx.workai.jinchang.ui.mine_drawer;

import android.os.Bundle;

import com.fcx.workai.jinchang.R;
import com.fcx.workai.jinchang.ui.mine_drawer.mysetting.MineSettingFragment;
import com.hxh.component.basicore.component.mvp.persenter.IPresenter;
import com.hxh.component.basicore.component.mvp.view.BaseActivity;
import com.hxh.component.business.ui.bean.UserCompanyListBean;
import com.hxh.component.business.utils.Constant;

import java.util.ArrayList;

import me.yokeyword.fragmentation.anim.DefaultHorizontalAnimator;
import me.yokeyword.fragmentation.anim.FragmentAnimator;

/**
 * Created by mardawang on 2018/1/17.
 */

public class MineMainActivity extends BaseActivity {

    private ArrayList<String> idlist;
    private UserCompanyListBean.ItemsBean mChooseCompany;

    @Override
    public int getLayoutId() {
        return R.layout.activity_main_mine;
    }

    @Override
    public void initData(Bundle saveInstanceState) {
        String tag = getExtra_String(Constant.RouterTag.SHOWTAG);
        if(getIntent()!=null){
            idlist = getIntent().getStringArrayListExtra("unread_ids");
            mChooseCompany = getIntent().getParcelableExtra("choose_company");
        }
        showFragmentForTag(tag);
    }

    private void showFragmentForTag(String tag) {
        switch (tag)
        {
            case Constant.RouterTag.MINE_MAIN:
                break;
            case Constant.RouterTag.MINE_SETTING:
                loadRootFragment(R.id.frame_main, MineSettingFragment.newInstance());
                break;

        }
    }

    @Override
    public FragmentAnimator onCreateFragmentAnimator() {
        return new DefaultHorizontalAnimator();
    }


    @Override
    public IPresenter newP() {
        return null;
    }
}
